Hệ thống quản lý trường học bằng PHP / MySQLi

1 <?php
2 error_reporting(
0);//turning off error reporting
3 include(
"connect.php");
4 $sql=
"SELECT studentid FROM students where studentid LIKE '%CCA%'";
5 $records=mysqli_query($db,$sql);
6
7
8 ?>
9 <?php
10 SESSION_START();
11 ?>
12 <!DOCTYPE html>
13 <html>
14 <head>
15      <meta charset=
"utf-8">
16     <meta name=
"viewport" content="width=device-width, initial-scale=1.0">
17     <title>school management system</title>
18     <link rel=
"shortcut icon" href="assets/img/title.gif" type="image/x-icon">
19     <link rel=
"stylesheet" href="assets/css/bootstrap.min.css">
20     <link href=
"assets/css/loader.css" rel="stylesheet" />
21     <script src=
"assets/js/canvasjs.min.js"></script>
22     <!--*****jquery -
3.2.1.js file supports the use of dropdown***-->
23     <script src=
"assets/js/jquery-3.2.1.js"></script>
24 </head>
25 <body >
26 <!--end of heading section-->
27 <ul
class="nav navbar-right top-nav">
28     <div
class="dropdown">
29   <button
class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" >
30   <?php
31         
//Check to see if the user is logged in.if not redirect user to the loging page.
32         
33         
if(isset($_SESSION['fname']))
34         {
35         echo
"Current user: ".$_SESSION['fname']. "&nbsp;".$_SESSION['lname']. " ";
36         }
else{
37           echo
"<script type='text/javascript'>
38                     alert( 'You must Log
in to use the system');
39                     </script>"
;
40                 echo
"<script>
41                     window.location = 'index.php'
42                   </script>"
;
43         }
44         ?>
45   <span
class="caret"></span></button>
46   <ul
class="dropdown-menu">
47       <li><a href=
"manage_account.php"><i class="fa fa-users fa-lg"></i>&nbsp;View User</a></li>
48       <li><a href=
"register_form.php"><i class="fa fa-users fa-lg"></i>&nbsp;Add New User</a></li>
49       <li
class="divider"></li>
50       <li><a href=
"session_logout.php"><i class="fa fa-fw fa-power-off"></i>&nbsp;Log Out</a></li>
51   </ul>
52 </div>
53   </ul>
54 <!--************************************************-->
55 <div style=
"
56     font-family:Nyala, Arial;
57     text-align: left;
58     background-color: #526F35;
59     padding: 20px;
60     color:white;
61     width:
100%;
62     height: 150px;"
>
63
64     <!--
this is the heading section-->
65     <h2>
66             <?php
67             $sql=
"SELECT * FROM companyinfo";
68             $result=mysqli_query($db,$sql) or die(
"error getting data");
69             $num_rows=mysqli_num_rows($result);
70              
while($row=mysqli_fetch_array($result))
71                     {
72                     echo
'<image style="height:82px; width:82px;" src="data:image;base64,'. $row['clogo'].' "> ';
73                     $cname = $row[
'cname'];
74                      $cemail = $row[
'cemail'];
75                       $ccontact = $row[
'ccontact'];
76                        $clocation = $row[
'clocation'];
77                     }?>
78                     <?php
79                     echo $cname;
80                     ?>
81
82     <div style=
"float:right; font-size:20px;text-align:right;">
83     
84     <img src=
"assets/img/mail2.png">Email: <?php echo $cemail; ?><br>
85     <img src=
"assets/img/call1.png">Contact:<?php echo $ccontact; ?><br>
86     <img src=
"assets/img/location.png">Location: <?php echo $clocation; ?>
87     
88     </div>
89    </h2>
90 </div>
91 <!--end of heading section-->
92 <div>
93         <ul
class="nav nav-tabs">
94             <li ><a href=
"homepage.php" >Administration <img src="assets/img/details.png"></a></li>
95             <li ><a href=
"students.php" >Students <img src="assets/img/student48.png"></a></li>
96             <li><a href=
"staff.php">Staff Member <img src="assets/img/staff48.png"></a></li>
97             <li><a href=
"course.php" >Courses <img src="assets/img/course.png"></a></li>
98             <li><a href=
"departments.php" >Departments <img src="assets/img/department.png"></a></li>
99             <li><a href=
"markstep1.php" >Exams <img src="assets/img/update.png"></a></li>
100             <li><a href=
"hostel.php" >Hostel <img src="assets/img/details.png"></a></li>
101             <li><a href=
"sms.php">SMS <img src="assets/img/details.png"></a></li>
102             <!--<li><a href=
"tab-8" role="tab" data-toggle="tab">Hostel <img src="assets/img/details.png"></a></li>
103             <li><a href=
"tab-7" role="tab" data-toggle="tab">Parents <img src="assets/img/details.png"></a></li>-->
104             
105         </ul>
106         <div
class="tab-content">
107             <div
class="tab-pane active" role="tabpanel" id="tab-1">
108                 
109                 <p>
110                     <div
class="table-responsive" >
111
112 <div
class="row">
113         <div
class="col-sm-3">
114         </div>
115
116         <div
class="col-sm-6">
117 <table >
118 <tr><td colspan=
"3" style="font-size:15px; text-align:left">
119     <h4><font color=
"red">Please note</font></h4>
120         A CSV (comma-separated values) file stores the tabular data
in plain text format. Basically, CSV file format is used to import to or export from the table data. Each line of the CSV file is a data record that consists of one or more fields. When there is needed to add the huge data into the MySQL database, it’s very time-consuming to add data one by one. In that situation, import feature helps to insert a bunch of data in one click.<br>
121
122 Using CSV file you can store all the data and import the CSV file data
into the database at once using PHP and MySQL. Import CSV into MySQL helps to save the user time and avoid repetitive work.
123  </td>
124 </tr>
125 <tr><td colspan=
"3" style="font-size:15px; text-align:left">
126     <h4><font color=
"red">Ho to create CVS file</font></h4>
127         A CSV
is a comma separated values file which allows data to be saved in a table structured format. CSVs look like a garden-variety spreadsheet but with a .csv extension. Traditionally they take the form of a text file containing information separated by commas, hence the name.<br>
128
129 CSV files can be used with any spreadsheet program, such
as Microsoft Excel, Open Office Calc, or Google Spreadsheets. They differ from other spreadsheet file types in that you can only have a single sheet in a file, they can not save cell, column, or row styling, and can not save formulas.<br>
130
131 In ecommerce, CSVs are used primarily
for importing and exporting product, customer, and order information to and from your store.
132
133 Sample Product Import CSV: bulk-edit-product-import.csv<br>
134
135 Saving Your Spreadsheet
as a CSV<br>
136
137  
138 Note: These instructions are
for Microsoft Excel 2010, but any spreadsheet software will follow a similar process.<br>
139 1
. Open your file in your spreadsheet program.<br>
140
141 2
. Click on File and choose Save As.<br>
142 <img src=
"assets/img/csv1">
143
144 File › Save As

145
146 3
. Under Save as type, choose CSV (Comma delimited). Click Save.<br>
147 <img src=
"assets/img/csv2">
148
149 4
. You may see a message that your file "may contain features that are not compatible with CSV." This message is to inform you that any formatting you may have (such as colors or bold text) and any formulas will not be preserved in the CSV formatted file. Click Yes to continue.
150 <img src=
"assets/img/csv3">
151  </td>
152 </tr>
153 </table>
154
155 </body>
156 </html>
157 <table>


Gõ tìm kiếm nhanh...